package com.lzx.indicatordemo;

import android.content.Intent;
import android.os.Bundle;
import android.view.View;

import androidx.appcompat.app.AppCompatActivity;

import com.lzx.indicatordemo.demo.CustomLayoutTitleActivity;
import com.lzx.indicatordemo.demo.IndicatorWithBadgeDemoActivity;
import com.lzx.indicatordemo.demo.LineIndicatorDemoActivity;
import com.lzx.indicatordemo.demo.ListenerCallbackDemoActivity;
import com.lzx.indicatordemo.demo.PointIndicatorDemoActivity;
import com.lzx.indicatordemo.demo.TitleFollowSlideDemoActivity;
import com.lzx.indicatordemo.demo.Viewpager2DemoActivity;
import com.lzx.indicatordemo.demo.WrapTitleDemoActivity;


public class MainActivity extends AppCompatActivity {

    @Override
    protected void onCreate(Bundle savedInstanceState) {
        super.onCreate(savedInstanceState);
        setContentView(R.layout.activity_main);

        findViewById(R.id.line_btn).setOnClickListener(new View.OnClickListener() {
            @Override
            public void onClick(View view) {
                start(LineIndicatorDemoActivity.class);
            }
        });
        findViewById(R.id.title_btn).setOnClickListener(new View.OnClickListener() {
            @Override
            public void onClick(View view) {
                start(TitleFollowSlideDemoActivity.class);
            }
        });
        findViewById(R.id.point_btn).setOnClickListener(new View.OnClickListener() {
            @Override
            public void onClick(View view) {
                start(PointIndicatorDemoActivity.class);
            }
        });
        findViewById(R.id.wrap_btn).setOnClickListener(new View.OnClickListener() {
            @Override
            public void onClick(View view) {
                start(WrapTitleDemoActivity.class);
            }
        });
        findViewById(R.id.listener_btn).setOnClickListener(new View.OnClickListener() {
            @Override
            public void onClick(View view) {
                start(ListenerCallbackDemoActivity.class);
            }
        });
        findViewById(R.id.line_badge_btn).setOnClickListener(new View.OnClickListener() {
            @Override
            public void onClick(View view) {
                start(IndicatorWithBadgeDemoActivity.class);
            }
        });
        findViewById(R.id.custom_layout_btn).setOnClickListener(new View.OnClickListener() {
            @Override
            public void onClick(View view) {
                start(CustomLayoutTitleActivity.class);
            }
        });
        findViewById(R.id.viewpager2_btn).setOnClickListener(new View.OnClickListener() {
            @Override
            public void onClick(View view) {
                start(Viewpager2DemoActivity.class);
            }
        });
    }


    private void start(Class clz) {
        Intent intent = new Intent(MainActivity.this, clz);
        startActivity(intent);
    }


}
